import axios from "axios";
import {getRateByProvinceName} from "@/api/rate.js";

export function getTotalPopulation(){
    return axios.get("http://127.0.0.1:8000/population_feature/population")
}

export function getPopulationByProvinceName(provinceName){
    return axios.get("http://127.0.0.1:8000/geography/resident/"+provinceName)
}

export function getPopulationByYear(year){
    return axios.get(`http://127.0.0.1:8000/geography/resident_year/${year}`)
}

export function getPopulationOfAllProvince(){
    return axios.get("http://127.0.0.1:8000/population_feature/population_of_lastyear")
}

export function getPopulationDensityByYear(year){
    return axios.get(`http://127.0.0.1:8000/geography/density_new/${year}`)
}

export function getPopulationDensityByCity(city){
    return axios.get(`http://127.0.0.1:8000/geography/density/${city}`)
}